package com.laycoding.common.util;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class IpUtils {
    public IpUtils() {
        System.out.printf("111");
    }

    public static String getIp(){
        String ip = "";
        try {
            InetAddress addr = InetAddress.getLocalHost();
            ip =addr.getHostAddress();
            return ip;
        }catch (Exception e){
            return ip;
        }
    }
}
